<!DOCTYPE html>
<html lang="en-US">
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width,initial-scale=1">
    <title>字符串成就 | AchievementDoc</title>
    <meta name="generator" content="VuePress 1.9.7">
    <link rel="icon" href="Achievement.svg">
    <meta name="description" content="BDS llse plugins Achievement">
    <meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=no">
    
    <link rel="preload" href="/AchievementDocs/assets/css/0.styles.faa91785.css" as="style"><link rel="preload" href="/AchievementDocs/assets/js/app.edb454d1.js" as="script"><link rel="preload" href="/AchievementDocs/assets/js/2.7abd1384.js" as="script"><link rel="preload" href="/AchievementDocs/assets/js/12.3037f7c6.js" as="script"><link rel="preload" href="/AchievementDocs/assets/js/26.c62ce9be.js" as="script"><link rel="prefetch" href="/AchievementDocs/assets/js/10.e2c0d9c4.js"><link rel="prefetch" href="/AchievementDocs/assets/js/11.68f630cf.js"><link rel="prefetch" href="/AchievementDocs/assets/js/13.dee9ab6c.js"><link rel="prefetch" href="/AchievementDocs/assets/js/14.b289dab8.js"><link rel="prefetch" href="/AchievementDocs/assets/js/15.43d0b29e.js"><link rel="prefetch" href="/AchievementDocs/assets/js/16.20b317fe.js"><link rel="prefetch" href="/AchievementDocs/assets/js/17.f21db974.js"><link rel="prefetch" href="/AchievementDocs/assets/js/18.21f52500.js"><link rel="prefetch" href="/AchievementDocs/assets/js/19.b4007424.js"><link rel="prefetch" href="/AchievementDocs/assets/js/20.71325f04.js"><link rel="prefetch" href="/AchievementDocs/assets/js/21.5a949711.js"><link rel="prefetch" href="/AchievementDocs/assets/js/22.1a2cf411.js"><link rel="prefetch" href="/AchievementDocs/assets/js/23.0dcec73e.js"><link rel="prefetch" href="/AchievementDocs/assets/js/24.a28a9d80.js"><link rel="prefetch" href="/AchievementDocs/assets/js/25.d9eb6bef.js"><link rel="prefetch" href="/AchievementDocs/assets/js/27.003d037b.js"><link rel="prefetch" href="/AchievementDocs/assets/js/28.738a65b9.js"><link rel="prefetch" href="/AchievementDocs/assets/js/29.ad6cac79.js"><link rel="prefetch" href="/AchievementDocs/assets/js/3.f6c8ad74.js"><link rel="prefetch" href="/AchievementDocs/assets/js/30.a8e62aa4.js"><link rel="prefetch" href="/AchievementDocs/assets/js/31.6a208574.js"><link rel="prefetch" href="/AchievementDocs/assets/js/32.834105cd.js"><link rel="prefetch" href="/AchievementDocs/assets/js/33.ed913bbc.js"><link rel="prefetch" href="/AchievementDocs/assets/js/34.312d58db.js"><link rel="prefetch" href="/AchievementDocs/assets/js/35.22689fc9.js"><link rel="prefetch" href="/AchievementDocs/assets/js/36.f27625a2.js"><link rel="prefetch" href="/AchievementDocs/assets/js/37.d128139d.js"><link rel="prefetch" href="/AchievementDocs/assets/js/38.b602055e.js"><link rel="prefetch" href="/AchievementDocs/assets/js/39.e9af109c.js"><link rel="prefetch" href="/AchievementDocs/assets/js/4.2aefbe48.js"><link rel="prefetch" href="/AchievementDocs/assets/js/40.73f99be4.js"><link rel="prefetch" href="/AchievementDocs/assets/js/41.0511e1a1.js"><link rel="prefetch" href="/AchievementDocs/assets/js/42.e43479cb.js"><link rel="prefetch" href="/AchievementDocs/assets/js/43.1ab7be64.js"><link rel="prefetch" href="/AchievementDocs/assets/js/44.373a49a0.js"><link rel="prefetch" href="/AchievementDocs/assets/js/5.f7715398.js"><link rel="prefetch" href="/AchievementDocs/assets/js/6.b0416276.js"><link rel="prefetch" href="/AchievementDocs/assets/js/7.167c7f4c.js"><link rel="prefetch" href="/AchievementDocs/assets/js/8.a5598e6f.js"><link rel="prefetch" href="/AchievementDocs/assets/js/9.b58c1acd.js">
    <link rel="stylesheet" href="/AchievementDocs/assets/css/0.styles.faa91785.css">
  </head>
  <body>
    <div id="app" data-server-rendered="true"><div class="theme-container"><!----> <header class="navbar"><div class="navbar-container"><div class="sidebar-button"><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" role="img" viewBox="0 0 448 512" class="icon"><path fill="currentColor" d="M436 124H12c-6.627 0-12-5.373-12-12V80c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12zm0 160H12c-6.627 0-12-5.373-12-12v-32c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12zm0 160H12c-6.627 0-12-5.373-12-12v-32c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12z"></path></svg></div> <a href="/AchievementDocs/" class="home-link router-link-active"><!----> <span class="site-name">AchievementDoc</span></a> <div class="links"><div class="search-box"><input aria-label="Search" placeholder="Search" autocomplete="off" spellcheck="false" value=""> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" class="search-icon"><path d="M21.7,20.3L18,16.6c1.2-1.5,2-3.5,2-5.6c0-5-4-9-9-9c-5,0-9,4-9,9c0,5,4,9,9,9c2.1,0,4.1-0.7,5.6-2l3.7,3.7c0.2,0.2,0.5,0.3,0.7,0.3s0.5-0.1,0.7-0.3C22.1,21.3,22.1,20.7,21.7,20.3zM4,11c0-3.9,3.1-7,7-7c3.9,0,7,3.1,7,7c0,1.9-0.8,3.7-2,4.9c0,0,0,0,0,0s0,0,0,0c-1.3,1.3-3,2-4.9,2C7.1,18,4,14.9,4,11z"></path></svg> <span class="search-command-wrapper search-command"><span class="search-command-char">⌘</span> <span class="search-command-char">K</span></span> <!----></div> <nav class="nav-links can-hide"><div class="nav-item"><a href="/AchievementDocs/" class="vp-link nav-link">
  Home
  </a></div><div class="nav-item"><a href="/AchievementDocs/guide.html" class="vp-link nav-link">
  指南🧭
  </a></div><div class="nav-item"><a href="/AchievementDocs/question.html" class="vp-link nav-link">
  Q&amp;A
  </a></div><div class="nav-item"><a href="https://github.com/246859/Achievement.git" target="_blank" class="vp-link external nav-link">
  Github
  <!----> </a></div><div class="nav-item"><a href="https://github.com/246859/AchievementDoc" target="_blank" class="vp-link external nav-link">
  编辑✍
  <!----> </a></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="站点" class="dropdown-title"><span class="title">站点</span> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" class="icon-down"><path d="M12,16c-0.3,0-0.5-0.1-0.7-0.3l-6-6c-0.4-0.4-0.4-1,0-1.4s1-0.4,1.4,0l5.3,5.3l5.3-5.3c0.4-0.4,1-0.4,1.4,0s0.4,1,0,1.4l-6,6C12.5,15.9,12.3,16,12,16z"></path></svg></button> <button type="button" aria-label="站点" class="mobile-dropdown-title"><span class="title">站点</span> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" class="arrow-icon"><path d="M9,19c-0.3,0-0.5-0.1-0.7-0.3c-0.4-0.4-0.4-1,0-1.4l5.3-5.3L8.3,6.7c-0.4-0.4-0.4-1,0-1.4s1-0.4,1.4,0l6,6c0.4,0.4,0.4,1,0,1.4l-6,6C9.5,18.9,9.3,19,9,19z"></path></svg></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="https://246859.github.io/AchievementDocs/" target="_blank" class="vp-link external nav-link">
  国外
  <!----> </a></li><li class="dropdown-item"><!----> <a href="https://float1024.gitee.io/achievementdocs/" target="_blank" class="vp-link external nav-link">
  国内
  <!----> </a></li></ul></div></div> <div class="VPNavBarAppearance appearance" data-v-19d27b0e><button type="button" aria-label="toggle dark mode" class="vt-switch vt-switch-appearance" data-v-19d27b0e><span class="vt-switch-check"><span class="vt-switch-icon"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" class="vt-switch-appearance-sun"><path d="M12,18c-3.3,0-6-2.7-6-6s2.7-6,6-6s6,2.7,6,6S15.3,18,12,18zM12,8c-2.2,0-4,1.8-4,4c0,2.2,1.8,4,4,4c2.2,0,4-1.8,4-4C16,9.8,14.2,8,12,8z"></path> <path d="M12,4c-0.6,0-1-0.4-1-1V1c0-0.6,0.4-1,1-1s1,0.4,1,1v2C13,3.6,12.6,4,12,4z"></path> <path d="M12,24c-0.6,0-1-0.4-1-1v-2c0-0.6,0.4-1,1-1s1,0.4,1,1v2C13,23.6,12.6,24,12,24z"></path> <path d="M5.6,6.6c-0.3,0-0.5-0.1-0.7-0.3L3.5,4.9c-0.4-0.4-0.4-1,0-1.4s1-0.4,1.4,0l1.4,1.4c0.4,0.4,0.4,1,0,1.4C6.2,6.5,5.9,6.6,5.6,6.6z"></path> <path d="M19.8,20.8c-0.3,0-0.5-0.1-0.7-0.3l-1.4-1.4c-0.4-0.4-0.4-1,0-1.4s1-0.4,1.4,0l1.4,1.4c0.4,0.4,0.4,1,0,1.4C20.3,20.7,20,20.8,19.8,20.8z"></path> <path d="M3,13H1c-0.6,0-1-0.4-1-1s0.4-1,1-1h2c0.6,0,1,0.4,1,1S3.6,13,3,13z"></path> <path d="M23,13h-2c-0.6,0-1-0.4-1-1s0.4-1,1-1h2c0.6,0,1,0.4,1,1S23.6,13,23,13z"></path> <path d="M4.2,20.8c-0.3,0-0.5-0.1-0.7-0.3c-0.4-0.4-0.4-1,0-1.4l1.4-1.4c0.4-0.4,1-0.4,1.4,0s0.4,1,0,1.4l-1.4,1.4C4.7,20.7,4.5,20.8,4.2,20.8z"></path> <path d="M18.4,6.6c-0.3,0-0.5-0.1-0.7-0.3c-0.4-0.4-0.4-1,0-1.4l1.4-1.4c0.4-0.4,1-0.4,1.4,0s0.4,1,0,1.4l-1.4,1.4C18.9,6.5,18.6,6.6,18.4,6.6z"></path></svg> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" class="vt-switch-appearance-moon"><path d="M12.1,22c-0.3,0-0.6,0-0.9,0c-5.5-0.5-9.5-5.4-9-10.9c0.4-4.8,4.2-8.6,9-9c0.4,0,0.8,0.2,1,0.5c0.2,0.3,0.2,0.8-0.1,1.1c-2,2.7-1.4,6.4,1.3,8.4c2.1,1.6,5,1.6,7.1,0c0.3-0.2,0.7-0.3,1.1-0.1c0.3,0.2,0.5,0.6,0.5,1c-0.2,2.7-1.5,5.1-3.6,6.8C16.6,21.2,14.4,22,12.1,22zM9.3,4.4c-2.9,1-5,3.6-5.2,6.8c-0.4,4.4,2.8,8.3,7.2,8.7c2.1,0.2,4.2-0.4,5.8-1.8c1.1-0.9,1.9-2.1,2.4-3.4c-2.5,0.9-5.3,0.5-7.5-1.1C9.2,11.4,8.1,7.7,9.3,4.4z"></path></svg></span></span></button></div> <!----></nav></div></div></header> <div class="sidebar-mask"></div> <aside class="sidebar"><nav class="nav-links"><div class="nav-item"><a href="/AchievementDocs/" class="vp-link nav-link">
  Home
  </a></div><div class="nav-item"><a href="/AchievementDocs/guide.html" class="vp-link nav-link">
  指南🧭
  </a></div><div class="nav-item"><a href="/AchievementDocs/question.html" class="vp-link nav-link">
  Q&amp;A
  </a></div><div class="nav-item"><a href="https://github.com/246859/Achievement.git" target="_blank" class="vp-link external nav-link">
  Github
  <!----> </a></div><div class="nav-item"><a href="https://github.com/246859/AchievementDoc" target="_blank" class="vp-link external nav-link">
  编辑✍
  <!----> </a></div><div class="nav-item"><div class="dropdown-wrapper"><button type="button" aria-label="站点" class="dropdown-title"><span class="title">站点</span> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" class="icon-down"><path d="M12,16c-0.3,0-0.5-0.1-0.7-0.3l-6-6c-0.4-0.4-0.4-1,0-1.4s1-0.4,1.4,0l5.3,5.3l5.3-5.3c0.4-0.4,1-0.4,1.4,0s0.4,1,0,1.4l-6,6C12.5,15.9,12.3,16,12,16z"></path></svg></button> <button type="button" aria-label="站点" class="mobile-dropdown-title"><span class="title">站点</span> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" class="arrow-icon"><path d="M9,19c-0.3,0-0.5-0.1-0.7-0.3c-0.4-0.4-0.4-1,0-1.4l5.3-5.3L8.3,6.7c-0.4-0.4-0.4-1,0-1.4s1-0.4,1.4,0l6,6c0.4,0.4,0.4,1,0,1.4l-6,6C9.5,18.9,9.3,19,9,19z"></path></svg></button> <ul class="nav-dropdown" style="display:none;"><li class="dropdown-item"><!----> <a href="https://246859.github.io/AchievementDocs/" target="_blank" class="vp-link external nav-link">
  国外
  <!----> </a></li><li class="dropdown-item"><!----> <a href="https://float1024.gitee.io/achievementdocs/" target="_blank" class="vp-link external nav-link">
  国内
  <!----> </a></li></ul></div></div> <div class="VPNavBarAppearance appearance" data-v-19d27b0e><button type="button" aria-label="toggle dark mode" class="vt-switch vt-switch-appearance" data-v-19d27b0e><span class="vt-switch-check"><span class="vt-switch-icon"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" class="vt-switch-appearance-sun"><path d="M12,18c-3.3,0-6-2.7-6-6s2.7-6,6-6s6,2.7,6,6S15.3,18,12,18zM12,8c-2.2,0-4,1.8-4,4c0,2.2,1.8,4,4,4c2.2,0,4-1.8,4-4C16,9.8,14.2,8,12,8z"></path> <path d="M12,4c-0.6,0-1-0.4-1-1V1c0-0.6,0.4-1,1-1s1,0.4,1,1v2C13,3.6,12.6,4,12,4z"></path> <path d="M12,24c-0.6,0-1-0.4-1-1v-2c0-0.6,0.4-1,1-1s1,0.4,1,1v2C13,23.6,12.6,24,12,24z"></path> <path d="M5.6,6.6c-0.3,0-0.5-0.1-0.7-0.3L3.5,4.9c-0.4-0.4-0.4-1,0-1.4s1-0.4,1.4,0l1.4,1.4c0.4,0.4,0.4,1,0,1.4C6.2,6.5,5.9,6.6,5.6,6.6z"></path> <path d="M19.8,20.8c-0.3,0-0.5-0.1-0.7-0.3l-1.4-1.4c-0.4-0.4-0.4-1,0-1.4s1-0.4,1.4,0l1.4,1.4c0.4,0.4,0.4,1,0,1.4C20.3,20.7,20,20.8,19.8,20.8z"></path> <path d="M3,13H1c-0.6,0-1-0.4-1-1s0.4-1,1-1h2c0.6,0,1,0.4,1,1S3.6,13,3,13z"></path> <path d="M23,13h-2c-0.6,0-1-0.4-1-1s0.4-1,1-1h2c0.6,0,1,0.4,1,1S23.6,13,23,13z"></path> <path d="M4.2,20.8c-0.3,0-0.5-0.1-0.7-0.3c-0.4-0.4-0.4-1,0-1.4l1.4-1.4c0.4-0.4,1-0.4,1.4,0s0.4,1,0,1.4l-1.4,1.4C4.7,20.7,4.5,20.8,4.2,20.8z"></path> <path d="M18.4,6.6c-0.3,0-0.5-0.1-0.7-0.3c-0.4-0.4-0.4-1,0-1.4l1.4-1.4c0.4-0.4,1-0.4,1.4,0s0.4,1,0,1.4l-1.4,1.4C18.9,6.5,18.6,6.6,18.4,6.6z"></path></svg> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" class="vt-switch-appearance-moon"><path d="M12.1,22c-0.3,0-0.6,0-0.9,0c-5.5-0.5-9.5-5.4-9-10.9c0.4-4.8,4.2-8.6,9-9c0.4,0,0.8,0.2,1,0.5c0.2,0.3,0.2,0.8-0.1,1.1c-2,2.7-1.4,6.4,1.3,8.4c2.1,1.6,5,1.6,7.1,0c0.3-0.2,0.7-0.3,1.1-0.1c0.3,0.2,0.5,0.6,0.5,1c-0.2,2.7-1.5,5.1-3.6,6.8C16.6,21.2,14.4,22,12.1,22zM9.3,4.4c-2.9,1-5,3.6-5.2,6.8c-0.4,4.4,2.8,8.3,7.2,8.7c2.1,0.2,4.2-0.4,5.8-1.8c1.1-0.9,1.9-2.1,2.4-3.4c-2.5,0.9-5.3,0.5-7.5-1.1C9.2,11.4,8.1,7.7,9.3,4.4z"></path></svg></span></span></button></div> <!----></nav>  <ul class="sidebar-links"><li><section class="sidebar-group collapsable depth-0"><a href="/AchievementDocs/view/config/" class="sidebar-heading clickable"><span>配置教程⚙️</span> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" class="arrow-icon"><path d="M9,19c-0.3,0-0.5-0.1-0.7-0.3c-0.4-0.4-0.4-1,0-1.4l5.3-5.3L8.3,6.7c-0.4-0.4-0.4-1,0-1.4s1-0.4,1.4,0l6,6c0.4,0.4,0.4,1,0,1.4l-6,6C9.5,18.9,9.3,19,9,19z"></path></svg></a> <!----></section></li><li><section class="sidebar-group collapsable depth-0"><a href="/AchievementDocs/view/diy/" class="sidebar-heading clickable router-link-active open"><span>自定义教程🗜️</span> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" class="arrow-icon"><path d="M12,16c-0.3,0-0.5-0.1-0.7-0.3l-6-6c-0.4-0.4-0.4-1,0-1.4s1-0.4,1.4,0l5.3,5.3l5.3-5.3c0.4-0.4,1-0.4,1.4,0s0.4,1,0,1.4l-6,6C12.5,15.9,12.3,16,12,16z"></path></svg></a> <ul class="sidebar-links sidebar-group-items"><li><a href="/AchievementDocs/view/diy/0.diyString.html" aria-current="page" class="active sidebar-link">字符串成就</a></li><li><a href="/AchievementDocs/view/diy/1.diyNumber.html" class="sidebar-link">数字成就</a></li><li><a href="/AchievementDocs/view/diy/4.diyLang.html" class="sidebar-link">自定义语言</a></li><li><a href="/AchievementDocs/view/diy/5.diyImg.html" class="sidebar-link">自定义图标</a></li></ul></section></li><li><section class="sidebar-group collapsable depth-0"><a href="/AchievementDocs/view/api/" class="sidebar-heading clickable"><span>API导出🔌</span> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" class="arrow-icon"><path d="M9,19c-0.3,0-0.5-0.1-0.7-0.3c-0.4-0.4-0.4-1,0-1.4l5.3-5.3L8.3,6.7c-0.4-0.4-0.4-1,0-1.4s1-0.4,1.4,0l6,6c0.4,0.4,0.4,1,0,1.4l-6,6C9.5,18.9,9.3,19,9,19z"></path></svg></a> <!----></section></li><li><section class="sidebar-group collapsable depth-0"><a href="/AchievementDocs/view/entry/" class="sidebar-heading clickable"><span>词条百科📚</span> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" class="arrow-icon"><path d="M9,19c-0.3,0-0.5-0.1-0.7-0.3c-0.4-0.4-0.4-1,0-1.4l5.3-5.3L8.3,6.7c-0.4-0.4-0.4-1,0-1.4s1-0.4,1.4,0l6,6c0.4,0.4,0.4,1,0,1.4l-6,6C9.5,18.9,9.3,19,9,19z"></path></svg></a> <!----></section></li></ul> </aside> <main class="page viewdiy0.diyString.html"> <div class="theme-default-content vp-doc content__default"><h1 id="字符串成就"><a href="#字符串成就" class="header-anchor">#</a> 字符串成就</h1> <div class="custom-block tip"><p class="custom-block-title">TIP</p> <p>除了特殊成就之外，不同的字符串成就，修改起来大体上并无差别，不过可能也有不同的细节需要注意，若要查询这些细节可以移步<a href="/AchievementDocs/view/entry/">词条百科</a>。</p> <p><strong>并且，在修改之前一定记得备份数据！</strong></p></div> <div class="language-json line-numbers-mode"><pre class="language-json"><code><span class="token punctuation">{</span>
  <span class="token property">&quot;destroyBlock&quot;</span><span class="token operator">:</span> <span class="token punctuation">{</span>
    <span class="token property">&quot;enable&quot;</span><span class="token operator">:</span> <span class="token boolean">true</span><span class="token punctuation">,</span>
    <span class="token property">&quot;name&quot;</span><span class="token operator">:</span> <span class="token string">&quot;方块破坏成就&quot;</span><span class="token punctuation">,</span>
    <span class="token property">&quot;details&quot;</span><span class="token operator">:</span> <span class="token punctuation">{</span>
      <span class="token property">&quot;minecraft:log&quot;</span><span class="token operator">:</span> <span class="token punctuation">{</span>
        <span class="token property">&quot;enable&quot;</span><span class="token operator">:</span> <span class="token boolean">true</span><span class="token punctuation">,</span>
        <span class="token property">&quot;msg&quot;</span><span class="token operator">:</span> <span class="token string">&quot;要致富，先撸树!&quot;</span><span class="token punctuation">,</span>
        <span class="token property">&quot;condition&quot;</span><span class="token operator">:</span> <span class="token string">&quot;首次砍掉原木&quot;</span>
      <span class="token punctuation">}</span><span class="token punctuation">,</span>
      <span class="token property">&quot;minecraft:stone&quot;</span><span class="token operator">:</span> <span class="token punctuation">{</span>
        <span class="token property">&quot;enable&quot;</span><span class="token operator">:</span> <span class="token boolean">true</span><span class="token punctuation">,</span>
        <span class="token property">&quot;msg&quot;</span><span class="token operator">:</span> <span class="token string">&quot;疯狂的石头!&quot;</span><span class="token punctuation">,</span>
        <span class="token property">&quot;condition&quot;</span><span class="token operator">:</span> <span class="token string">&quot;首次挖掘石头&quot;</span>
      <span class="token punctuation">}</span>
    <span class="token punctuation">}</span><span class="token punctuation">,</span>
    <span class="token property">&quot;regx&quot;</span><span class="token operator">:</span> <span class="token punctuation">{</span><span class="token punctuation">}</span>
  <span class="token punctuation">}</span>
<span class="token punctuation">}</span>
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br><span class="line-number">4</span><br><span class="line-number">5</span><br><span class="line-number">6</span><br><span class="line-number">7</span><br><span class="line-number">8</span><br><span class="line-number">9</span><br><span class="line-number">10</span><br><span class="line-number">11</span><br><span class="line-number">12</span><br><span class="line-number">13</span><br><span class="line-number">14</span><br><span class="line-number">15</span><br><span class="line-number">16</span><br><span class="line-number">17</span><br><span class="line-number">18</span><br><span class="line-number">19</span><br></div></div><p>此页的所有数据均以此为例。</p> <h2 id="认识结构"><a href="#认识结构" class="header-anchor">#</a> 认识结构</h2> <p>在修改成就词条之前，需要先简单的了解一下结构，在这里以方块破坏成就举例子，方块破坏成就是最基础的一个成就类型，它的结构简化一下可以变为下方的样子。</p> <div class="language-json line-numbers-mode"><pre class="language-json"><code><span class="token punctuation">{</span>
  <span class="token property">&quot;achi_type&quot;</span><span class="token operator">:</span> <span class="token punctuation">{</span>
    <span class="token property">&quot;enable&quot;</span><span class="token operator">:</span> <span class="token boolean">true</span><span class="token punctuation">,</span>
    <span class="token property">&quot;name&quot;</span><span class="token operator">:</span> <span class="token string">&quot;achi_type_disName&quot;</span><span class="token punctuation">,</span>
    <span class="token property">&quot;details&quot;</span><span class="token operator">:</span> <span class="token punctuation">{</span>
      <span class="token property">&quot;triggerName&quot;</span><span class="token operator">:</span> <span class="token punctuation">{</span>
        <span class="token property">&quot;enable&quot;</span><span class="token operator">:</span> <span class="token boolean">true</span><span class="token punctuation">,</span>
        <span class="token property">&quot;msg&quot;</span><span class="token operator">:</span> <span class="token string">&quot;achi_msg&quot;</span><span class="token punctuation">,</span>
        <span class="token property">&quot;condition&quot;</span><span class="token operator">:</span> <span class="token string">&quot;achi_condition&quot;</span>
      <span class="token punctuation">}</span>
    <span class="token punctuation">}</span><span class="token punctuation">,</span>
    <span class="token property">&quot;regx&quot;</span><span class="token operator">:</span> <span class="token punctuation">{</span><span class="token punctuation">}</span>
  <span class="token punctuation">}</span>
<span class="token punctuation">}</span>
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br><span class="line-number">4</span><br><span class="line-number">5</span><br><span class="line-number">6</span><br><span class="line-number">7</span><br><span class="line-number">8</span><br><span class="line-number">9</span><br><span class="line-number">10</span><br><span class="line-number">11</span><br><span class="line-number">12</span><br><span class="line-number">13</span><br><span class="line-number">14</span><br></div></div><p><code>achi_type</code>指成就类型，此成就类型只是体现在数据中，给玩家展示成就类型名是<code>achi_type_disName</code> ，<code>details</code>则负责存放一个成就类型对象中的词条对象。在一个词条对象中，它的<code>key</code>值就是成就的触发器<code>triggerName</code>，内部总共有三个属性，<code>enable</code>表示该词条是否启用，<code>msg</code>存放完成成就后展示的信息，<code>condition</code> 存放获得成就的条件，插件判断成就是否完成的逻辑是由代码完成，此处的<code>condition</code>仅仅只是展示给玩家看的，除此之外没有任何作用，<code>regx</code>对象则代表的正则映射，即通过正则匹配后，需要映射到的<code>triggerName</code>。</p> <div class="custom-block tip"><p class="custom-block-title">TIP</p> <p>大部分情况下，可以修改的有<code>achi_msg</code>，<code>achi_condition</code>，<code>triggerName</code> ，<code>achi_type_disName</code>，<code>enable</code>，其他的属性，除非有专门的提示，否则不要进行修改。</p></div> <h2 id="基础"><a href="#基础" class="header-anchor">#</a> 基础</h2> <h3 id="修改词条"><a href="#修改词条" class="header-anchor">#</a> 修改词条</h3> <p>在简单认识完结构之后，先从最简单的修改开始操作。</p> <p>例如希望在挖掉原木时提示的成就信息可以带点自己喜欢的颜色，则应该如下修改</p> <div class="language-json line-numbers-mode"><pre class="language-json"><code><span class="token punctuation">{</span>
  <span class="token property">&quot;destroyBlock&quot;</span><span class="token operator">:</span> <span class="token punctuation">{</span>
    <span class="token property">&quot;enable&quot;</span><span class="token operator">:</span> <span class="token boolean">true</span><span class="token punctuation">,</span>
    <span class="token property">&quot;name&quot;</span><span class="token operator">:</span> <span class="token string">&quot;方块破坏成就&quot;</span><span class="token punctuation">,</span>
    <span class="token property">&quot;details&quot;</span><span class="token operator">:</span> 	<span class="token punctuation">{</span>
      <span class="token property">&quot;minecraft:log&quot;</span><span class="token operator">:</span> <span class="token punctuation">{</span>
        <span class="token property">&quot;enable&quot;</span><span class="token operator">:</span> <span class="token boolean">true</span><span class="token punctuation">,</span>
        <span class="token property">&quot;msg&quot;</span><span class="token operator">:</span> <span class="token string">&quot;§c从要致富，先撸树!&quot;</span><span class="token punctuation">,</span>
        <span class="token property">&quot;condition&quot;</span><span class="token operator">:</span> <span class="token string">&quot;§c首次砍掉原木&quot;</span>
      <span class="token punctuation">}</span>
    <span class="token punctuation">}</span><span class="token punctuation">,</span>
    <span class="token property">&quot;regx&quot;</span><span class="token operator">:</span> <span class="token punctuation">{</span><span class="token punctuation">}</span>
  <span class="token punctuation">}</span>
<span class="token punctuation">}</span>
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br><span class="line-number">4</span><br><span class="line-number">5</span><br><span class="line-number">6</span><br><span class="line-number">7</span><br><span class="line-number">8</span><br><span class="line-number">9</span><br><span class="line-number">10</span><br><span class="line-number">11</span><br><span class="line-number">12</span><br><span class="line-number">13</span><br><span class="line-number">14</span><br></div></div><p>在加入特殊字符<code>§c</code>后，成就提示信息变为了浅红色。</p> <h3 id="增加词条"><a href="#增加词条" class="header-anchor">#</a> 增加词条</h3> <p>增加词条分为两种情况</p> <ul><li><strong>等值匹配</strong>：在成就完成情况比对时，将会把传入触发器的值与<code>triggerName</code>进行等值比对，适合单一触发器。</li> <li><strong>正则匹配</strong>：在成就完成情况比对时，将会把传入触发器的值进行相应的正则检验，当触发器有多个类型名时，例如<code>minecraft:log</code>与<code>minecraft:log2</code>都表示原木，但是只想添加一个砍树的成就，这时候就需要用到正则。</li></ul> <div class="custom-block tip"><p class="custom-block-title">TIP</p> <p>插件在启动时，会根据配置文件设置的语言扫描对应的语言目录，其目录下的所有符合成就词条规范的<code>.json</code>文件都会被加载，也就是说用户在<strong>增加</strong>自己词条时不一定都要去修改<code>Entry.json</code>默认词条文件，为了秉持基本的开闭原则，可以自行参考<code>Template.json</code>格式书写一份类似的词条文件，并且将其放在对应的语言目录下，这样将默认词条与自定义词条区分开来，减少了默认词条文件的结构变动，更有利于管理用户的自定义词条，也减少了出错的可能性。</p></div> <h4 id="等值匹配"><a href="#等值匹配" class="header-anchor">#</a> 等值匹配</h4> <p>例如希望添加一个采摘蒲公英的成就，首先前往<a href="https://minecraft.fandom.com/zh/wiki/Minecraft_Wiki" target="_blank" rel="noopener noreferrer">中文Minecraft Wiki - 最详细的我的世界百科 (fandom.com)<span><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg> <span class="sr-only">(opens new window)</span></span></a>查询对应的命名空间ID，查询到为:<code>yellow_flower</code>，标准类型名就是:<code>minecraft:yellow_flower</code>，随后想好属于自己的词条信息后，将标准类型名作为键，写入<code>details</code>对象中即可，完整json如下</p> <div class="language-json line-numbers-mode"><pre class="language-json"><code><span class="token punctuation">{</span>
  <span class="token property">&quot;destroyBlock&quot;</span><span class="token operator">:</span> <span class="token punctuation">{</span>
    <span class="token property">&quot;enable&quot;</span><span class="token operator">:</span> <span class="token boolean">true</span><span class="token punctuation">,</span>
    <span class="token property">&quot;name&quot;</span><span class="token operator">:</span> <span class="token string">&quot;方块破坏成就&quot;</span><span class="token punctuation">,</span>
    <span class="token property">&quot;details&quot;</span><span class="token operator">:</span> 	<span class="token punctuation">{</span>
      <span class="token property">&quot;minecraft:log&quot;</span><span class="token operator">:</span> <span class="token punctuation">{</span>
        <span class="token property">&quot;enable&quot;</span><span class="token operator">:</span> <span class="token boolean">true</span><span class="token punctuation">,</span>
        <span class="token property">&quot;msg&quot;</span><span class="token operator">:</span> <span class="token string">&quot;§c从要致富，先撸树!&quot;</span><span class="token punctuation">,</span>
        <span class="token property">&quot;condition&quot;</span><span class="token operator">:</span> <span class="token string">&quot;§c首次砍掉原木&quot;</span>
      <span class="token punctuation">}</span><span class="token punctuation">,</span>
      <span class="token property">&quot;minecraft:yellow_flower&quot;</span><span class="token operator">:</span> <span class="token punctuation">{</span>
        <span class="token property">&quot;enable&quot;</span><span class="token operator">:</span> <span class="token boolean">true</span><span class="token punctuation">,</span>
        <span class="token property">&quot;msg&quot;</span><span class="token operator">:</span> <span class="token string">&quot;蒲公英的约定&quot;</span><span class="token punctuation">,</span>
        <span class="token property">&quot;condition&quot;</span><span class="token operator">:</span> <span class="token string">&quot;采摘蒲公英&quot;</span>
      <span class="token punctuation">}</span>
    <span class="token punctuation">}</span>
  <span class="token punctuation">}</span>
<span class="token punctuation">}</span>
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br><span class="line-number">4</span><br><span class="line-number">5</span><br><span class="line-number">6</span><br><span class="line-number">7</span><br><span class="line-number">8</span><br><span class="line-number">9</span><br><span class="line-number">10</span><br><span class="line-number">11</span><br><span class="line-number">12</span><br><span class="line-number">13</span><br><span class="line-number">14</span><br><span class="line-number">15</span><br><span class="line-number">16</span><br><span class="line-number">17</span><br><span class="line-number">18</span><br></div></div><h4 id="正则匹配"><a href="#正则匹配" class="header-anchor">#</a> 正则匹配</h4> <p>例如希望添加一个采摘花的成就，但是在Minecraft中，花不止一种，而且标准类型名也不同，不可能为每一种都写一个词条，这即不合理也浪费空间，这时候便需要用到正则匹配。先前往wiki查询所有花对应的命名空间，总共有四种，则对应的标准类型名为：<code>minecraft:yellow_flower</code>，<code>minecraft:red_flower</code>，<code>minecraft:double_plant</code>，<code>minecraft:wither_rose</code>，随后编写正则表达式为<code>/_flower|_plant|_rose/g</code>(只是举例，不保证完全正确),再然后发挥想象力编写词条，将正则表达式作为key值写入<code>regx</code>对象中，值为要映射的<code>triggerName</code>，<strong>最后需要注意的是正则不用加<code>//g</code>前后缀，加了会匹配失败</strong>。</p> <div class="language-json line-numbers-mode"><pre class="language-json"><code><span class="token punctuation">{</span>
  <span class="token property">&quot;destroyBlock&quot;</span><span class="token operator">:</span> <span class="token punctuation">{</span>
    <span class="token property">&quot;enable&quot;</span><span class="token operator">:</span> <span class="token boolean">true</span><span class="token punctuation">,</span>
    <span class="token property">&quot;name&quot;</span><span class="token operator">:</span> <span class="token string">&quot;方块破坏成就&quot;</span><span class="token punctuation">,</span>
    <span class="token property">&quot;details&quot;</span><span class="token operator">:</span> 	<span class="token punctuation">{</span>
      <span class="token property">&quot;minecraft:log&quot;</span><span class="token operator">:</span> <span class="token punctuation">{</span>
        <span class="token property">&quot;enable&quot;</span><span class="token operator">:</span> <span class="token boolean">true</span><span class="token punctuation">,</span>
        <span class="token property">&quot;msg&quot;</span><span class="token operator">:</span> <span class="token string">&quot;§c从要致富，先撸树!&quot;</span><span class="token punctuation">,</span>
        <span class="token property">&quot;condition&quot;</span><span class="token operator">:</span> <span class="token string">&quot;§c首次砍掉原木&quot;</span>
      <span class="token punctuation">}</span><span class="token punctuation">,</span>
      <span class="token property">&quot;minecraft:yellow_flower&quot;</span><span class="token operator">:</span> <span class="token punctuation">{</span>
        <span class="token property">&quot;enable&quot;</span><span class="token operator">:</span> <span class="token boolean">true</span><span class="token punctuation">,</span>
        <span class="token property">&quot;msg&quot;</span><span class="token operator">:</span> <span class="token string">&quot;蒲公英的约定&quot;</span><span class="token punctuation">,</span>
        <span class="token property">&quot;condition&quot;</span><span class="token operator">:</span> <span class="token string">&quot;采摘蒲公英&quot;</span>
      <span class="token punctuation">}</span><span class="token punctuation">,</span>
      <span class="token property">&quot;myflower&quot;</span><span class="token operator">:</span> <span class="token punctuation">{</span>
        <span class="token property">&quot;enable&quot;</span><span class="token operator">:</span> <span class="token boolean">true</span><span class="token punctuation">,</span>
        <span class="token property">&quot;msg&quot;</span><span class="token operator">:</span> <span class="token string">&quot;沉浸于花的海洋&quot;</span><span class="token punctuation">,</span>
        <span class="token property">&quot;condition&quot;</span><span class="token operator">:</span> <span class="token string">&quot;采摘一朵花&quot;</span>
      <span class="token punctuation">}</span>
    <span class="token punctuation">}</span><span class="token punctuation">,</span>
    <span class="token property">&quot;regx&quot;</span><span class="token operator">:</span> <span class="token punctuation">{</span>
      <span class="token property">&quot;_flower|_plant|_rose&quot;</span><span class="token operator">:</span> <span class="token string">&quot;myflower&quot;</span>
    <span class="token punctuation">}</span>
  <span class="token punctuation">}</span>
<span class="token punctuation">}</span>
</code></pre> <div class="line-numbers-wrapper"><span class="line-number">1</span><br><span class="line-number">2</span><br><span class="line-number">3</span><br><span class="line-number">4</span><br><span class="line-number">5</span><br><span class="line-number">6</span><br><span class="line-number">7</span><br><span class="line-number">8</span><br><span class="line-number">9</span><br><span class="line-number">10</span><br><span class="line-number">11</span><br><span class="line-number">12</span><br><span class="line-number">13</span><br><span class="line-number">14</span><br><span class="line-number">15</span><br><span class="line-number">16</span><br><span class="line-number">17</span><br><span class="line-number">18</span><br><span class="line-number">19</span><br><span class="line-number">20</span><br><span class="line-number">21</span><br><span class="line-number">22</span><br><span class="line-number">23</span><br><span class="line-number">24</span><br><span class="line-number">25</span><br><span class="line-number">26</span><br></div></div><h3 id="删除词条"><a href="#删除词条" class="header-anchor">#</a> 删除词条</h3> <p>删除词条也分两种情况，分为删除默认词条，与删除自定义词条。</p> <h4 id="删除默认词条"><a href="#删除默认词条" class="header-anchor">#</a> 删除默认词条</h4> <p>删除默认词条时，倘若开启了检查更新，那么在删除默认词条时，如果只是直接删除，在启动时插件会自动比对本地词条与默认词条的缺失项，然后再将其补齐，等于没删。</p> <p>正确的做法是将词条的<code>enable</code>项修改为<code>false</code>，即禁用，对于默认词条，只建议禁用，不建议删除。倘若<strong>永远不需要检查更新</strong>，那么默认词条随便删除，不过需要记住的是，一旦后续开启了检查更新，所有缺失的默认词条都会被自动复原。</p> <div class="custom-block warning"><p class="custom-block-title">WARNING</p> <p>倘若词条的<code>enable</code>项缺失，也会被视为禁用。</p></div> <h4 id="删除自定义词条"><a href="#删除自定义词条" class="header-anchor">#</a> 删除自定义词条</h4> <p>如果是删除用户自己添加的自定义词条，既可以选择将<code>enable</code>项修改为<code>false</code>达到禁用的效果，也可以直接将json对象删除。</p> <div class="custom-block tip"><p class="custom-block-title">TIP</p> <p>作者建议不管在什么情况下，尽量使用禁用而不是直接删除。</p></div></div> <footer class="page-edit"><!----> <div class="last-updated"><svg width="1em" height="1em" viewBox="0 0 24 24" class="last-updated-icon"><path d="M21 10.12h-6.78l2.74-2.82c-2.73-2.7-7.15-2.8-9.88-.1a6.887 6.887 0 0 0 0 9.8c2.73 2.7 7.15 2.7 9.88 0c1.36-1.35 2.04-2.92 2.04-4.9h2c0 1.98-.88 4.55-2.64 6.29c-3.51 3.48-9.21 3.48-12.72 0c-3.5-3.47-3.53-9.11-.02-12.58a8.987 8.987 0 0 1 12.65 0L21 3v7.12M12.5 8v4.25l3.5 2.08l-.72 1.21L11 13V8h1.5z" fill="currentColor"></path></svg> <span class="prefix">最后更新于: </span> <span class="time">10/18/2022, 9:58:41 AM</span></div></footer> <div class="page-nav"><div class="inner"><a href="/AchievementDocs/view/config/3.data.html" class="vp-link prev"><span>←</span>
  数据文件
  <span><br> <span class="prev-link">/view/config/3.data.html</span></span></a> <a href="/AchievementDocs/view/diy/1.diyNumber.html" class="vp-link next">
  数字成就
  <span>
        →
        <br> <span class="next-link">/view/diy/1.diyNumber.html</span></span></a></div></div> </main> <div class="sticker vuepress-toc"><div class="on-this-page">ON THIS PAGE</div> <div class="vuepress-toc-item vuepress-toc-h2 active"><a href="#认识结构" title="认识结构">认识结构</a></div><div class="vuepress-toc-item vuepress-toc-h2"><a href="#基础" title="基础">基础</a></div><div class="vuepress-toc-item vuepress-toc-h3"><a href="#修改词条" title="修改词条">修改词条</a></div><div class="vuepress-toc-item vuepress-toc-h3"><a href="#增加词条" title="增加词条">增加词条</a></div><div class="vuepress-toc-item vuepress-toc-h3"><a href="#删除词条" title="删除词条">删除词条</a></div></div></div><div class="global-ui"><!----></div></div>
    <script src="/AchievementDocs/assets/js/app.edb454d1.js" defer></script><script src="/AchievementDocs/assets/js/2.7abd1384.js" defer></script><script src="/AchievementDocs/assets/js/12.3037f7c6.js" defer></script><script src="/AchievementDocs/assets/js/26.c62ce9be.js" defer></script>
  </body>
</html>
